import tools from '../../utils/tools.js';
export default{
	pickerOptions: {
		disabledDate(time) {
		
		},
		
		shortcuts: [{
			text: '本日',
			onClick(picker) {
				const end = new Date();
				const start = new Date();
				start.setHours(0);
				start.setMinutes(0);
				start.setSeconds(0)
				// start.setTime(start.getTime() - 3600 * 1000 * 24);
				picker.$emit('pick', [start, end]);
			}
		}, {
			text: '最近一周',
			onClick(picker) {
				const end = new Date();
				const start = new Date();
				start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);
				picker.$emit('pick', [start, end]);
			}
		}, {
			text: '最近一个月',
			onClick(picker) {
				const end = new Date();
				const start = new Date();
				start.setTime(start.getTime() - 3600 * 1000 * 24 * 30);
				picker.$emit('pick', [start, end]);
			}
		}, {
			text: '最近三个月',
			onClick(picker) {
				const end = new Date();
				const start = new Date();
				start.setTime(start.getTime() - 3600 * 1000 * 24 * 90);
				picker.$emit('pick', [start, end]);
			}
		}]
	},
	getDate(){
		const start = new Date();
		const end = new Date();
		start.setTime(start.getTime() - 3600 * 1000 * 24 * 30);
		let startF = tools.dateFtt('yyyy-MM-dd',start);
		let endF = tools.dateFtt('yyyy-MM-dd',end);
		let dateQuantum = [
			startF,endF
		]
		return dateQuantum;
		// this.$set(this.dateQuantum,0,start);
		// this.$set(this.dateQuantum,1,end);
	}
}